package com.aiit.service.impl;


import com.aiit.pojo.Patient;
import com.aiit.pojo.PatientbyDoctor;
import com.aiit.dao.PatientDao;
import com.aiit.service.IPatientService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
@Slf4j
public class PatientServiceImpl implements IPatientService {
    @Resource
    private PatientDao dao;
    @Override
    public Patient findPatient(String loginname, String password) {
        return dao.findPatient(loginname,password);
    }

    @Override
    public int addPatient(Patient patient) {
        return dao.addPatient(patient);
    }

    @Override
    public List<PatientbyDoctor> findAll() {

        return dao.findAll();
    }

    @Override
    public List<PatientbyDoctor> findPatientById(String name, String idnumber) {
        return dao.findPatientById(name,idnumber);
    }

    @Override
    public int patientUpdate(Patient patient) {
        return dao.patientUpdate(patient);
    }
}
